package com.streamkar.entity.request;

import com.streamkar.constant.Constants;
import com.streamkar.entity.base.RequestPaging;
import com.streamkar.entity.domain.Agency;

/**
 * @ClassName AgencyRequest
 * @Description
 * @Author tyfrost
 * @Date 2018/11/15 上午10:49
 * @Version 1.0
 */
public class AgencyRequest extends RequestPaging {

    private String queryValue;

    public Agency toEvent() {
        Agency agency = null;
        try {
            agency = this.toEntity(Agency.class);

            // 默认按钻石查询
            if ("1".equals(agency.getOrderBy())) {
                agency.setOrderBy(Constants.AGENCY_SORTBY);
            }

        } catch (Exception e) {
            e.printStackTrace();
        }
        return agency;
    }

    public String getQueryValue() {
        return queryValue;
    }

    public void setQueryValue(String queryValue) {
        this.queryValue = queryValue;
    }
}
